<?php
/* @var $this CustomerVipMembershipController */
/* @var $model CustomerVipMembership */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'customer-vip-membership-form',
	'enableAjaxValidation'=>false,
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'date_started'); ?>
		<?php $this->widget('zii.widgets.jui.CJuiDatePicker', array(
                        'model'=>$model,
                'attribute'=>'date_started',
                'name'=>'date5',
                        'language'=>Yii::app()->language=='et' ? 'et' : null,
                        'options'=>array(
                                'changeMonth'=> true,
                                'changeYear'=> true,
                                'yearRange'=>'1960:2020',
                                "dateFormat"=>'yy-mm-dd', // jquery plugin options
                                'showAnim'=>'fold', // 'show' (the default), 'slideDown', 'fadeIn', 'fold'
                                'showOn'=>'button', // 'focus', 'button', 'both'
      
                                'buttonText'=>Yii::t('ui','Select form calendar'),
                                'buttonImage'=>Yii::app()->request->baseUrl.'/images/calendar.png',
                                'buttonImageOnly'=>true,
                        ),
                        'htmlOptions'=>array(
                        'style'=>'width:150px;vertical-align:top'
                )))?>
		<?php echo $form->error($model,'date_started'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'vip_membership'); ?>
		<?php echo $form->dropDownList($model, 'vip_membership', CHtml::listData(
                        VipMembership::model()->findAll(), 'id', 'name'),
                        array('prompt' => 'Select the membership')
                ); ?>
		<?php echo $form->error($model,'vip_membership'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'customer'); ?>
		<?php echo $form->dropDownList($model, 'customer', CHtml::listData(
                        Profile::model()->findAll(), 'user_id', 'firstname', 'lastname'),
                        array('prompt' => 'Select Customer')
                ); ?>
		<?php echo $form->error($model,'customer'); ?>
	</div>

	<div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? 'Create' : 'Save'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->